Kaydet (Commit) 13e0ec9f authored tarafından Miklos Vajna's avatar Miklos Vajna

gtktiledviewer: hide new view button when it's not supposed to work

Change-Id: I91003540f994eeaab78bc66ed6e0df9e9f59ee4b
üst 57a5912d
......@@ -1058,11 +1058,15 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pEnableEditing, -1);
g_signal_connect(G_OBJECT(pEnableEditing), "toggled", G_CALLBACK(toggleEditing), nullptr);
GtkToolItem* pNewViewButton = gtk_tool_button_new( nullptr, nullptr);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pNewViewButton), "view-continuous-symbolic");
gtk_tool_item_set_tooltip_text(pNewViewButton, "New View");
gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pNewViewButton, -1);
g_signal_connect(G_OBJECT(pNewViewButton), "clicked", G_CALLBACK(createView), nullptr);
static bool bViewCallback = getenv("LOK_VIEW_CALLBACK");
if (bViewCallback)
{
GtkToolItem* pNewViewButton = gtk_tool_button_new( nullptr, nullptr);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pNewViewButton), "view-continuous-symbolic");
gtk_tool_item_set_tooltip_text(pNewViewButton, "New View");
gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pNewViewButton, -1);
g_signal_connect(G_OBJECT(pNewViewButton), "clicked", G_CALLBACK(createView), nullptr);
}
gtk_box_pack_start(GTK_BOX(rWindow.m_pVBox), pUpperToolbar, FALSE, FALSE, 0 ); // Adds to top.
// Lower toolbar.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment